# Run these steps to update this file:
sed -i 's/ *"\*\*\/Tests\/"//' composer.json
composer u -o
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.1' php .github/patch-types.php
head=$(sed '/^diff /Q' .github/expected-missing-return-types.diff)
git checkout src/Symfony/Contracts/Service/ResetInterface.php
(echo "$head" && echo && git diff -U2 src/ | grep '^index ' -v) > .github/expected-missing-return-types.diff
git checkout composer.json src/

diff --git a/src/Symfony/Component/BrowserKit/AbstractBrowser.php b/src/Symfony/Component/BrowserKit/AbstractBrowser.php
--- a/src/Symfony/Component/BrowserKit/AbstractBrowser.php
+++ b/src/Symfony/Component/BrowserKit/AbstractBrowser.php
@@ -407,5 +407,5 @@ abstract class AbstractBrowser
      * @throws \RuntimeException When processing returns exit code
      */
-    protected function doRequestInProcess(object $request)
+    protected function doRequestInProcess(object $request): object
     {
         $deprecationsFile = tempnam(sys_get_temp_dir(), 'deprec');
@@ -440,5 +440,5 @@ abstract class AbstractBrowser
      * @return object
      */
-    abstract protected function doRequest(object $request);
+    abstract protected function doRequest(object $request): object;

     /**
@@ -451,5 +451,5 @@ abstract class AbstractBrowser
      * @throws LogicException When this abstract class is not implemented
      */
-    protected function getScript(object $request)
+    protected function getScript(object $request): string
     {
         throw new LogicException('To insulate requests, you need to override the getScript() method.');
@@ -461,5 +461,5 @@ abstract class AbstractBrowser
      * @return object
      */
-    protected function filterRequest(Request $request)
+    protected function filterRequest(Request $request): object
     {
         return $request;
@@ -471,5 +471,5 @@ abstract class AbstractBrowser
      * @return Response
      */
-    protected function filterResponse(object $response)
+    protected function filterResponse(object $response): Response
     {
         return $response;
diff --git a/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php
--- a/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php
+++ b/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php
@@ -94,5 +94,5 @@ abstract class NodeDefinition implements NodeParentInterface
      * @return NodeParentInterface|NodeBuilder|self|ArrayNodeDefinition|VariableNodeDefinition
      */
-    public function end(): NodeParentInterface
+    public function end(): NodeParentInterface|NodeBuilder|\Symfony\Component\Config\Definition\Builder\NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition
     {
         return $this->parent;
diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php
--- a/src/Symfony/Component/Console/Command/Command.php
+++ b/src/Symfony/Component/Console/Command/Command.php
@@ -163,5 +163,5 @@ class Command
      * @return void
      */
-    protected function configure()
+    protected function configure(): void
     {
     }
@@ -195,5 +195,5 @@ class Command
      * @return void
      */
-    protected function interact(InputInterface $input, OutputInterface $output)
+    protected function interact(InputInterface $input, OutputInterface $output): void
     {
     }
@@ -211,5 +211,5 @@ class Command
      * @return void
      */
-    protected function initialize(InputInterface $input, OutputInterface $output)
+    protected function initialize(InputInterface $input, OutputInterface $output): void
     {
     }
diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php
--- a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php
+++ b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php
@@ -38,5 +38,5 @@ abstract class AbstractRecursivePass implements CompilerPassInterface
      * @return void
      */
-    public function process(ContainerBuilder $container)
+    public function process(ContainerBuilder $container): void
     {
         $this->container = $container;
@@ -69,5 +69,5 @@ abstract class AbstractRecursivePass implements CompilerPassInterface
      * @return mixed
      */
-    protected function processValue(mixed $value, bool $isRoot = false)
+    protected function processValue(mixed $value, bool $isRoot = false): mixed
     {
         if (\is_array($value)) {
diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php b/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php
--- a/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php
+++ b/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php
@@ -26,4 +26,4 @@ interface CompilerPassInterface
      * @return void
      */
-    public function process(ContainerBuilder $container);
+    public function process(ContainerBuilder $container): void;
 }
diff --git a/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php
--- a/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php
+++ b/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php
@@ -27,4 +27,4 @@ interface ConfigurationExtensionInterface
      * @return ConfigurationInterface|null
      */
-    public function getConfiguration(array $config, ContainerBuilder $container);
+    public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface;
 }
diff --git a/src/Symfony/Component/DependencyInjection/Extension/Extension.php b/src/Symfony/Component/DependencyInjection/Extension/Extension.php
--- a/src/Symfony/Component/DependencyInjection/Extension/Extension.php
+++ b/src/Symfony/Component/DependencyInjection/Extension/Extension.php
@@ -32,5 +32,5 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn
      * @return string|false
      */
-    public function getXsdValidationBasePath()
+    public function getXsdValidationBasePath(): string|false
     {
         return false;
@@ -40,5 +40,5 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn
      * @return string
      */
-    public function getNamespace()
+    public function getNamespace(): string
     {
         return 'http://example.org/schema/dic/'.$this->getAlias();
@@ -77,5 +77,5 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn
      * @return ConfigurationInterface|null
      */
-    public function getConfiguration(array $config, ContainerBuilder $container)
+    public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface
     {
         $class = static::class;
diff --git a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php
--- a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php
+++ b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php
@@ -30,5 +30,5 @@ interface ExtensionInterface
      * @throws \InvalidArgumentException When provided tag is not defined in this extension
      */
-    public function load(array $configs, ContainerBuilder $container);
+    public function load(array $configs, ContainerBuilder $container): void;

     /**
@@ -37,5 +37,5 @@ interface ExtensionInterface
      * @return string
      */
-    public function getNamespace();
+    public function getNamespace(): string;

     /**
@@ -44,5 +44,5 @@ interface ExtensionInterface
      * @return string|false
      */
-    public function getXsdValidationBasePath();
+    public function getXsdValidationBasePath(): string|false;

     /**
@@ -53,4 +53,4 @@ interface ExtensionInterface
      * @return string
      */
-    public function getAlias();
+    public function getAlias(): string;
 }
diff --git a/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php
--- a/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php
+++ b/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php
@@ -21,4 +21,4 @@ interface PrependExtensionInterface
      * @return void
      */
-    public function prepend(ContainerBuilder $container);
+    public function prepend(ContainerBuilder $container): void;
 }
diff --git a/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php b/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php
--- a/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php
+++ b/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php
@@ -46,4 +46,4 @@ interface EventSubscriberInterface
      * @return array<string, string|array{0: string, 1: int}|list<array{0: string, 1?: int}>>
      */
-    public static function getSubscribedEvents();
+    public static function getSubscribedEvents(): array;
 }
diff --git a/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php b/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php
--- a/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php
+++ b/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php
@@ -139,5 +139,5 @@ class ExpressionLanguage
      * @return void
      */
-    protected function registerFunctions()
+    protected function registerFunctions(): void
     {
         $this->addFunction(ExpressionFunction::fromPhp('constant'));
diff --git a/src/Symfony/Component/Form/AbstractType.php b/src/Symfony/Component/Form/AbstractType.php
--- a/src/Symfony/Component/Form/AbstractType.php
+++ b/src/Symfony/Component/Form/AbstractType.php
@@ -24,5 +24,5 @@ abstract class AbstractType implements FormTypeInterface
      * @return string|null
      */
-    public function getParent()
+    public function getParent(): ?string
     {
         return FormType::class;
@@ -32,5 +32,5 @@ abstract class AbstractType implements FormTypeInterface
      * @return void
      */
-    public function configureOptions(OptionsResolver $resolver)
+    public function configureOptions(OptionsResolver $resolver): void
     {
     }
@@ -39,5 +39,5 @@ abstract class AbstractType implements FormTypeInterface
      * @return void
      */
-    public function buildForm(FormBuilderInterface $builder, array $options)
+    public function buildForm(FormBuilderInterface $builder, array $options): void
     {
     }
@@ -46,5 +46,5 @@ abstract class AbstractType implements FormTypeInterface
      * @return void
      */
-    public function buildView(FormView $view, FormInterface $form, array $options)
+    public function buildView(FormView $view, FormInterface $form, array $options): void
     {
     }
@@ -53,5 +53,5 @@ abstract class AbstractType implements FormTypeInterface
      * @return void
      */
-    public function finishView(FormView $view, FormInterface $form, array $options)
+    public function finishView(FormView $view, FormInterface $form, array $options): void
     {
     }
@@ -60,5 +60,5 @@ abstract class AbstractType implements FormTypeInterface
      * @return string
      */
-    public function getBlockPrefix()
+    public function getBlockPrefix(): string
     {
         return StringUtil::fqcnToBlockPrefix(static::class) ?: '';
diff --git a/src/Symfony/Component/Form/FormTypeInterface.php b/src/Symfony/Component/Form/FormTypeInterface.php
--- a/src/Symfony/Component/Form/FormTypeInterface.php
+++ b/src/Symfony/Component/Form/FormTypeInterface.php
@@ -27,5 +27,5 @@ interface FormTypeInterface
      * @return string|null
      */
-    public function getParent();
+    public function getParent(): ?string;

     /**
@@ -34,5 +34,5 @@ interface FormTypeInterface
      * @return void
      */
-    public function configureOptions(OptionsResolver $resolver);
+    public function configureOptions(OptionsResolver $resolver): void;

     /**
@@ -48,5 +48,5 @@ interface FormTypeInterface
      * @see FormTypeExtensionInterface::buildForm()
      */
-    public function buildForm(FormBuilderInterface $builder, array $options);
+    public function buildForm(FormBuilderInterface $builder, array $options): void;

     /**
@@ -66,5 +66,5 @@ interface FormTypeInterface
      * @see FormTypeExtensionInterface::buildView()
      */
-    public function buildView(FormView $view, FormInterface $form, array $options);
+    public function buildView(FormView $view, FormInterface $form, array $options): void;

     /**
@@ -85,5 +85,5 @@ interface FormTypeInterface
      * @see FormTypeExtensionInterface::finishView()
      */
-    public function finishView(FormView $view, FormInterface $form, array $options);
+    public function finishView(FormView $view, FormInterface $form, array $options): void;

     /**
@@ -95,4 +95,4 @@ interface FormTypeInterface
      * @return string
      */
-    public function getBlockPrefix();
+    public function getBlockPrefix(): string;
 }
diff --git a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php
--- a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php
+++ b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php
@@ -35,5 +35,5 @@ abstract class Bundle implements BundleInterface
      * @return void
      */
-    public function boot()
+    public function boot(): void
     {
     }
@@ -42,5 +42,5 @@ abstract class Bundle implements BundleInterface
      * @return void
      */
-    public function shutdown()
+    public function shutdown(): void
     {
     }
@@ -52,5 +52,5 @@ abstract class Bundle implements BundleInterface
      * @return void
      */
-    public function build(ContainerBuilder $container)
+    public function build(ContainerBuilder $container): void
     {
     }
@@ -122,5 +122,5 @@ abstract class Bundle implements BundleInterface
      * @return void
      */
-    public function registerCommands(Application $application)
+    public function registerCommands(Application $application): void
     {
     }
diff --git a/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php b/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php
--- a/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php
+++ b/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php
@@ -28,5 +28,5 @@ interface BundleInterface
      * @return void
      */
-    public function boot();
+    public function boot(): void;

     /**
@@ -35,5 +35,5 @@ interface BundleInterface
      * @return void
      */
-    public function shutdown();
+    public function shutdown(): void;

     /**
@@ -44,5 +44,5 @@ interface BundleInterface
      * @return void
      */
-    public function build(ContainerBuilder $container);
+    public function build(ContainerBuilder $container): void;

     /**
diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
--- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
+++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
@@ -101,5 +101,5 @@ abstract class DataCollector implements DataCollectorInterface
      * @return void
      */
-    public function reset()
+    public function reset(): void
     {
         $this->data = [];
diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php
--- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php
+++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php
@@ -28,5 +28,5 @@ interface DataCollectorInterface extends ResetInterface
      * @return void
      */
-    public function collect(Request $request, Response $response, ?\Throwable $exception = null);
+    public function collect(Request $request, Response $response, ?\Throwable $exception = null): void;

     /**
@@ -35,4 +35,4 @@ interface DataCollectorInterface extends ResetInterface
      * @return string
      */
-    public function getName();
+    public function getName(): string;
 }
diff --git a/src/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php b/src/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php
--- a/src/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php
+++ b/src/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php
@@ -24,4 +24,4 @@ interface LateDataCollectorInterface
      * @return void
      */
-    public function lateCollect();
+    public function lateCollect(): void;
 }
diff --git a/src/Symfony/Component/HttpKernel/KernelInterface.php b/src/Symfony/Component/HttpKernel/KernelInterface.php
--- a/src/Symfony/Component/HttpKernel/KernelInterface.php
+++ b/src/Symfony/Component/HttpKernel/KernelInterface.php
@@ -37,5 +37,5 @@ interface KernelInterface extends HttpKernelInterface
      * @return void
      */
-    public function registerContainerConfiguration(LoaderInterface $loader);
+    public function registerContainerConfiguration(LoaderInterface $loader): void;

     /**
@@ -44,5 +44,5 @@ interface KernelInterface extends HttpKernelInterface
      * @return void
      */
-    public function boot();
+    public function boot(): void;

     /**
@@ -53,5 +53,5 @@ interface KernelInterface extends HttpKernelInterface
      * @return void
      */
-    public function shutdown();
+    public function shutdown(): void;

     /**
diff --git a/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php b/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php
--- a/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php
+++ b/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php
@@ -234,5 +234,5 @@ abstract class AttributeClassLoader implements LoaderInterface
      * @return string
      */
-    protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method)
+    protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method): string
     {
         $name = str_replace('\\', '_', $class->name).'_'.$method->name;
@@ -333,5 +333,5 @@ abstract class AttributeClassLoader implements LoaderInterface
      * @return void
      */
-    abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot);
+    abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot): void;

     /**
diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php b/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php
--- a/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php
+++ b/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php
@@ -28,5 +28,5 @@ interface TokenProviderInterface
      * @throws TokenNotFoundException if the token is not found
      */
-    public function loadTokenBySeries(string $series);
+    public function loadTokenBySeries(string $series): PersistentTokenInterface;

     /**
@@ -35,5 +35,5 @@ interface TokenProviderInterface
      * @return void
      */
-    public function deleteTokenBySeries(string $series);
+    public function deleteTokenBySeries(string $series): void;

     /**
@@ -44,5 +44,5 @@ interface TokenProviderInterface
      * @throws TokenNotFoundException if the token is not found
      */
-    public function updateToken(string $series, #[\SensitiveParameter] string $tokenValue, \DateTimeInterface $lastUsed);
+    public function updateToken(string $series, #[\SensitiveParameter] string $tokenValue, \DateTimeInterface $lastUsed): void;

     /**
@@ -51,4 +51,4 @@ interface TokenProviderInterface
      * @return void
      */
-    public function createNewToken(PersistentTokenInterface $token);
+    public function createNewToken(PersistentTokenInterface $token): void;
 }
diff --git a/src/Symfony/Component/Security/Http/Firewall.php b/src/Symfony/Component/Security/Http/Firewall.php
--- a/src/Symfony/Component/Security/Http/Firewall.php
+++ b/src/Symfony/Component/Security/Http/Firewall.php
@@ -51,5 +51,5 @@ class Firewall implements EventSubscriberInterface
      * @return void
      */
-    public function onKernelRequest(RequestEvent $event)
+    public function onKernelRequest(RequestEvent $event): void
     {
         if (!$event->isMainRequest()) {
@@ -99,5 +99,5 @@ class Firewall implements EventSubscriberInterface
      * @return void
      */
-    public function onKernelFinishRequest(FinishRequestEvent $event)
+    public function onKernelFinishRequest(FinishRequestEvent $event): void
     {
         $request = $event->getRequest();
@@ -112,5 +112,5 @@ class Firewall implements EventSubscriberInterface
      * @return array
      */
-    public static function getSubscribedEvents()
+    public static function getSubscribedEvents(): array
     {
         return [
@@ -123,5 +123,5 @@ class Firewall implements EventSubscriberInterface
      * @return void
      */
-    protected function callListeners(RequestEvent $event, iterable $listeners)
+    protected function callListeners(RequestEvent $event, iterable $listeners): void
     {
         foreach ($listeners as $listener) {
diff --git a/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php b/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php
--- a/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php
+++ b/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php
@@ -29,5 +29,5 @@ interface ExtractorInterface
      * @return void
      */
-    public function extract(string|iterable $resource, MessageCatalogue $catalogue);
+    public function extract(string|iterable $resource, MessageCatalogue $catalogue): void;

     /**
@@ -36,4 +36,4 @@ interface ExtractorInterface
      * @return void
      */
-    public function setPrefix(string $prefix);
+    public function setPrefix(string $prefix): void;
 }
diff --git a/src/Symfony/Component/Validator/ConstraintValidatorInterface.php b/src/Symfony/Component/Validator/ConstraintValidatorInterface.php
--- a/src/Symfony/Component/Validator/ConstraintValidatorInterface.php
+++ b/src/Symfony/Component/Validator/ConstraintValidatorInterface.php
@@ -24,5 +24,5 @@ interface ConstraintValidatorInterface
      * @return void
      */
-    public function initialize(ExecutionContextInterface $context);
+    public function initialize(ExecutionContextInterface $context): void;

     /**
@@ -31,4 +31,4 @@ interface ConstraintValidatorInterface
      * @return void
      */
-    public function validate(mixed $value, Constraint $constraint);
+    public function validate(mixed $value, Constraint $constraint): void;
 }
diff --git a/src/Symfony/Component/VarDumper/Dumper/DataDumperInterface.php b/src/Symfony/Component/VarDumper/Dumper/DataDumperInterface.php
--- a/src/Symfony/Component/VarDumper/Dumper/DataDumperInterface.php
+++ b/src/Symfony/Component/VarDumper/Dumper/DataDumperInterface.php
@@ -24,4 +24,4 @@ interface DataDumperInterface
      * @return string|null
      */
-    public function dump(Data $data);
+    public function dump(Data $data): ?string;
 }
diff --git a/src/Symfony/Contracts/Translation/LocaleAwareInterface.php b/src/Symfony/Contracts/Translation/LocaleAwareInterface.php
--- a/src/Symfony/Contracts/Translation/LocaleAwareInterface.php
+++ b/src/Symfony/Contracts/Translation/LocaleAwareInterface.php
@@ -21,5 +21,5 @@ interface LocaleAwareInterface
      * @throws \InvalidArgumentException If the locale contains invalid characters
      */
-    public function setLocale(string $locale);
+    public function setLocale(string $locale): void;

     /**
diff --git a/src/Symfony/Contracts/Translation/TranslatorTrait.php b/src/Symfony/Contracts/Translation/TranslatorTrait.php
--- a/src/Symfony/Contracts/Translation/TranslatorTrait.php
+++ b/src/Symfony/Contracts/Translation/TranslatorTrait.php
@@ -26,5 +26,5 @@ trait TranslatorTrait
      * @return void
      */
-    public function setLocale(string $locale)
+    public function setLocale(string $locale): void
     {
         $this->locale = $locale;
